package org.carabiner.harness;

import javax.swing.AbstractAction;
import javax.swing.Icon;
import javax.swing.ImageIcon;

/**
 * An abstract swing Action extension that provides methods to add
 * components to a Harness.
 * 
 * @author bjrady
 *
 */
public abstract class AbstractInfoPanelAction extends AbstractAction
{
  private Harness harness;

  public AbstractInfoPanelAction(Harness parent)
  {
    harness = parent;
  }

  protected Harness getHarness()
  {
    return harness;
  }    
  
  protected Icon getIcon(String name)
  {
    return new ImageIcon(InfoPanelAction.class.getResource(name));
  }
}
